Skip to content

[PR] feat(dsh): route models between stock native and bili compaction - #6123

Draft
bluesmilery wants to merge 19 commits into
ranxianglei:masterfrom
bluesmilery:2026-11-10_dsh-model-native-compaction
Draft

bluesmilery wants to merge 19 commits into
ranxianglei:masterfrom
bluesmilery:2026-11-10_dsh-model-native-compaction

Conversation

@bluesmilery

@bluesmilery bluesmilery commented Nov 10, 2026 •

Copy link
Copy Markdown

DSH Web users can select models that use stock DSH compaction while unmatched models continue to use bili. For example, gpt-* / codex/gpt-* use native compaction and GLM/Kimi use bili, including switching within one session. Wire passthrough alone cannot restore the disabled host backend.

Refs #6121; related #6106, #5975, #5300/#5404 and #4872/#4883.

Configuration surface proposal

Adds opt-in dsh.nativeCompactionModels: Array<{ provider?: string, model: string }>. Provider IDs match exactly; model IDs match exactly or by a trailing prefix *. No setting retains the existing bili behavior. Restart the host after changing the preset policy. An explicitly empty list returns all models to bili while retaining the generation isolation established by earlier native checkpoints; deleting the setting is a separate migration.

This remains a draft for maintainer review of the configuration and ownership contract. No maintainer approval, release or merge is implied.

Behavior

  • Preserve stock preset settings and the native backend in its isolated Cordis realm; gate automatic/manual native compaction by selected model and hide bili tools from native steps.
  • Delegate native summarize exactly once with the same input, agent, signal and receiver. Return its result/error unchanged. DSH owns thresholds, retention, model selection, prompts, output limits, pressure retries and checkpoint transactions.
  • Use only an asynchronous routing marker around native summaries, so they bypass bili even when DSH chooses an unmatched summary model. Concurrent bili sessions keep their own routing. Native HTTP bodies and headers remain intact; cross-mode reused WebSockets withhold the frame and close for the host's reconnect path.
  • Keep DSH's durable surface.replaceGeneration as the bili namespace boundary. Native checkpoints invalidate old fold identity without mutating the original event log. Replaying a session preserves this namespace. Ordinary appends and switches without a host replacement keep it stable.
  • Preserve bili's existing compression algorithm for unmatched models. A generation change starts a fresh bili namespace over the host's current visible history; it does not rewrite either algorithm.

There is no additional summary budget check, tool-schema reservation, message splitting, intermediate summarization, recursive merge or merge prompt. Those additions from earlier revisions of this draft have been removed. An oversized native request has stock DSH/provider failure behavior; this routing feature does not promise successful handoff of arbitrarily long history. The earlier Luna merge-quality A/B measured the removed implementation and is not acceptance evidence for this revision.

Validation

  • 280 focused regression tests pass, with no skips. The new transparent-delegation regression fails against the earlier wrapper and passes after removal. It verifies large inputs and schemas are delegated unchanged, with original errors/signals and no adapter retries.
  • Real DSH 0.2.2-rc.1 engine differential integration: 13 cases compare an engine without the policy adapter against one with it. Both start from exactly equal events. Compare complete summary requests, compaction events, replacement generations and measured context; normalize only newly generated host IDs. Cases cover below-pressure, pressure, two consecutive native compactions, manual/region compaction, model switching, explicit summarization model, provider error, retry, cancellation, oversized history and large/oversized tool catalogs. Error cases preserve history in both arms.
  • Actual DSH plugin interception plus independent real bili proxy/kernel processes: bili-only, routed unmatched model, and generation-after-native-checkpoint produce identical tool lists, active folds and both provider request JSON bodies for the same visible history. Execute the registered compress tool, resend its real call/result, and verify the retained summary and shorter request. Ignore only fold timestamps, durations and generated invocation IDs. Assert routing rules are active after plugin initialization.
  • Existing HTTP/WS ownership-switch, generation replay, concurrent native/bili isolation and preset tests pass. Typecheck, build, config coverage, architecture, unused exports and test import graph gates pass.
  • Clean upstream patch replay, dependency install, typecheck, focused tests, gates, build, detached-runtime integration and candidate packing pass. GitHub checks for head c4a91e9c4d882b8dcd4c5530436e39740509f304: 38 successful, 14 conditionally skipped, none failed or pending. Skipped checks are not claimed as executed coverage.
  • The same 13 real-engine differential cases also pass in an isolated directory on the target Mac mini with verified DSH module hashes and Node 24.13.0. Production settings, installed adapter hashes and DSH/bili process IDs remain unchanged before/after; this preceding isolation check did not deploy the candidate.

The differential upstream is deterministic to eliminate model randomness. These tests establish routing/algorithm-call parity for the covered cases, not universal summary fidelity.

Subsequent live deployment validation

The same head was backed up and installed through the official DSH plugin installer on the target Mac mini; all 21 installed dist files match the verified candidate. Two new real sessions exercised Luna native automatic/manual compaction, GLM bili compression, and both round trips. Eight successful native summaries and one bili block retain five fixed facts each; six recall checks pass. Thirty-nine raw-history prefix comparisons are unchanged. In the native handoff, DSH selected the previous GLM model for summaries; the old bili request counter remained 17 → 17, confirming the auxiliary calls bypassed bili. Returning to bili used a fresh namespace without old folds. Existing sessions remain listed, compression configuration is unchanged, and the prior default model was restored.

This was not an entirely clean run. The longer GLM → Luna switch failed twice at the stock shrink guard (summary 688 >= 432 and 431 >= 429 estimated tokens); completed checkpoints survived and the previous request header was preserved. Stock /compact then reduced the retained history and enabled the switch and return. One ordinary Luna pressure-compaction attempt also failed the stock shrink guard but its turn continued successfully. One GLM upstream stream_error recovered on short requests, and one GLM answer invoked read-only acp_status despite a no-tools prompt. These outcomes remain documented, with no adapter budget, splitting, prompt or retry changes. Bili compaction was explicitly requested; the 200000-token automatic nudge threshold was not exercised.

Compatibility and patch maintenance

Web standard/ptc/cordis and structurally equivalent presets with dsh-compaction-basic are covered. Stock minimal remains without a compaction backend; unsupported/unattached policies fail explicitly. Unknown DSH API versions and root-plane CLI compositions require additional compatibility validation.

The bilingual guide and detached-runtime integration script ship with the source. The local patch kit pins the upstream base, source commit, cumulative patch hash and DSH module hashes. Updates reapply to a clean checkout and rerun tests/build/integration before creating a candidate. Conflicts or failed checks retain the installed version; unknown future versions are not assumed compatible.

No kernel or proxy compression-pipeline changes, package version bump, registry publish or merge. The verified local package has been deployed after backup; the PR remains a draft.

@ranxianglei ranxianglei changed the title feat(dsh): per-model native compaction with safe session handoff [PR] feat(dsh): per-model native compaction with safe session handoff Nov 10, 2026
@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[bot] (ai: vllm-qwen/qwen3.8-27b)

Full independent review of this draft PR (GitHub #6123) is done — code, tests, docs, CI and compatibility boundaries walked from the diff, not from the PR description. Verdict up front: code quality is high; what's outstanding is your sign-off on the configuration contract plus a short punch-list before undrafting. No forced alignment-refactor warranted — naming, structure, error handling and test style match repo conventions.

查重: 不重复。 Searched open+closed issues/PRs for a per-model native-compaction mechanism — no prior thread proposes it. Same family as #5994 (restore native when bili-native is absent/disabled) but different granularity and mechanism: #5994 is binary/global (the whole lane flips to native when bili is off); this PR is per-model ownership declared in config, with bili still active for every other model and safe mid-session switching. Different enough to stand alone.

标签: dsh(DSH 客户端车道)· scope/wiring(客户端接入/协议边界层)· p3(opt-in 功能,未配置前零影响)· pr · needs-decision(契约待批)。功能类 PR 非缺陷,不打 bug。

Live state (verified just now): head a0ece877 — CI 30 checks: 16 success / 14 skipped / 0 failed (mirror cache, fetched 2026-11-10 14:20 UTC); PR is draft, mergeable=true, behind master (needs a rebase before final merge — not a review blocker). Thread has no earlier substantive review, so nothing here contradicts a prior position.

What I verified independently

Findings (punch-list — none blocking by itself)

  1. Title-request zombie ledger (minor, untested). With isolation on and generation ≥ 1, session-title requests always use the raw session id while main traffic uses the scoped |dsh-generation:N id — title payloads accumulate under a raw-id phantom conversation (invisible in the Context UI, grows once per regeneration; gen 0 unaffected). Decide: route titles under the scoped id too, or document as accepted storage noise — and pin whichever you choose with a test row.
  2. Fail-closed blast radius (disclose in "Behavior"). Isolation on + a DSH build lacking session.surface.replaceGeneration ⇒ every conversation-id call throws ⇒ even bili-owned models lose their bili tools in that session. Fail-visible and documented in the doc — acceptable, but it belongs in the PR body so users find it.
  3. Malformed-config edge (visible). An invalid nativeCompactionModels entry throws during lane activation, so the verdict is never set and the preset keeps its stock compaction-basic armed without bili tools — the host loader logs the error; only reachable with a bad config. One sentence in the doc would close it.
  4. Test rows missing: client React probe path; the /bili/origin?sessionId= policy face; the title-request behavior from fix: keep system prompt byte-stable for prefix cache #1; ready-set miss with a valid id (the existing test hits the missing-id throw instead).
  5. Minor nits: noteGateCoverage skipped on the new noBackend branch; WS owner check runs on create frames only (fine — an owner change implies reconnect); attachEngine at ~90 lines could split.

Behavior-change disclosure (old → new)

  • Default (key absent or []): zero change. Gen-0 sessions keep raw ids; no rules ⇒ no native models; byte-identical to today (CI green + e2e A/B verified).
  • When a non-empty array is configured (opt-in, host restart required):
    • Listed models' requests go direct to the provider — no bili routing, no compression, no x-bili-plugin header (previously: all models routed through bili, unmanaged native compaction refused at wire level since Remove dsh.allowDshCompaction escape hatch (unconditional wire refusal) | 移除 allowDshCompaction 配置:dsh 原生压缩一律拦截 #3666).
    • After any host history replacement, bili conversation ids gain a |dsh-generation:N suffix (new storage namespace); alias/fork/incremental seeds are deliberately NOT carried across the boundary — full sends + fresh watermark seed (conservative direction).
    • Bili tools hide on native-owned steps (conditional registration where the host supports it; execute-time refusal otherwise).
    • Auto/manual native compaction is gated for bili-owned models; native summaries stay direct even when DSH picks a different summarization model.
    • A reused WebSocket whose compaction owner changed: frame withheld + socket closed, host reconnects.
    • Context tab shows a "native compaction" hint instead of the bili ledger for native sessions.
    • New public export ./dsh-native-compaction + tsup entry (additive build surface).
    • Host API surface pinned to DSH 0.2.2-rc.1 features (tools.register {when}, options.purpose, replaceGeneration, ctx.inject(["compaction"])); documented degradations are safe (unknown when → execute-time throw; no inject → immediate attach).

🔶 需要决策

背景一句话:本 PR 是 DRAFT,作者明确请求 maintainer 审「配置/归属契约」;按 Configuration Surface Discipline,新增配置字段必须 owner 签核后才能进入合并。待决问题:是否批准 dsh.nativeCompactionModels 契约(形状、匹配语义、失败语义)。

结构化八问:

  1. 是什么问题:DSH Web 用户想按模型选择压缩归属——如 gpt-* 走 DSH 原生压缩、Kimi 保留 bili,同一会话内可来回切换;现状(Remove dsh.allowDshCompaction escape hatch (unconditional wire refusal) | 移除 allowDshCompaction 配置:dsh 原生压缩一律拦截 #3666)是原生压缩被线级守卫一律拒绝,[PR] Restore dsh native auto-compaction when bili-native is disabled or absent (#5248) #5994 只有全局粒度(bili 整体缺席才全部回退原生),表达不了「按模型分归属」。
  2. 什么原因导致的:现有配置面只能表达「怎么压」(providers 表、三级 compress 层级),表达不了「谁拥有压缩」;Remove dsh.allowDshCompaction escape hatch (unconditional wire refusal) | 移除 allowDshCompaction 配置:dsh 原生压缩一律拦截 #3666 移除逃生门后,按模型的归属通道不存在。本 PR 新增该通道:配置声明规则 + 预设隔离 realm 内的策略适配器接管原生后端。
  3. 影响范围与严重程度(按选项):
    • 选项 A(现契约批准):默认 [] 对现有用户零影响(字节级不变);启用后仅影响显式配置的 profile 中被列出的模型。无现存用户影响,属新增 opt-in 能力。
    • 选项 B(先补小修再批准):影响面同 A,另加一轮作者迭代成本(title 路由决策 + 4 行测试 + 两句文档)。
    • 选项 C(否决现形状,改精确匹配列表等替代):现有用户同样零影响,但失去 gpt-* 家族匹配便利,作者需重做匹配层与文档。
  4. 怎么修复的:机制层面五件事——① 配置声明每模型归属(trailing-* 前缀匹配,provider 精确可选,独立 * 与其他通配拒绝);② 预设内装策略适配器,按选中模型门控自动/手动原生压缩并隐藏 bili 工具;③ 原生请求在任何 bili 改写之前绕过(HTTP),WS 所有权变化拒帧关闭重连;④ 超量交接用工具对平衡的有界分批摘要,取消/失败/无进展/不可分割组超限均不提交部分替换点;⑤ 宿主持久化 replaceGeneration 派生独立 bili 命名空间(|dsh-generation:N),重启存活,边界外不携带别名/fork/增量种子。
  5. 是否有回归问题(高危模式逐项):默认值语义漂移——无(缺键/[]=今日行为,CI 30 项绿 + e2e A/B 实证);fail-fast 变吞错——无,全链路 fail-visible(ready 门、宿主 API 缺失、WS 拒帧、坏配置均抛错可见);阈值/时序漂移——无新阈值,内核常量未动;输出格式——probe face 增加 selectiveCompaction 字段,旧客户端解析器逐字段 guard、未知字段忽略,无破坏。残留非回归项:title 请求在 gen≥1 下写 raw-sid 幻影账本(新行为的小瑕疵,已列小修清单第 1 条)。
  6. 是否破坏缓存:不破坏。原生请求不经 bili,无缓存交互;bili 侧 generation 边界处增量车道与水位种子主动重建(宁重发不读旧);scoped 会话 id 是新存储命名空间,与旧会话行无交叉污染;provider 侧前缀缓存由 provider 自管,不受影响。
  7. 是否改了设计方向:无转向——复用 KDD release v0.1.2 #9 persona 命名空间惯例(<id>|后缀)、[dsh] Disabling the plugin permanently bricks dsh session creation - the bundle patch inject gate has no fallback (0.1.199 / dsh 0.2.1-rc.2) #3662 门禁闩锁语义,nudge 死锁无检测:同一 session 交替收到两种结构互斥的请求流(巨型单消息 ↔ 多轮)时不告警 #1729 线级守卫作为未受管原生压缩的兜底保持不变;只是新增一条受管的 opt-in 通道。内核逻辑与 DSH core 文件未动(声明与 diff 一致)。
  8. 是否引入了新的配置:是——dsh.nativeCompactionModels({provider?: string, model: string}[],默认 [],file-only 无 env 变量,与 dsh.contextTabLabel 的 file-only 惯例一致;子键 .model/.provider 已入配置文档 en/zh 与 server.yaml 种子)。迁移方式:存量安装无需迁移(缺键=现状);完全回退保留键置 [](保留已建立的代际边界)。

选项对比:

选项 契约处置 代价 风险
A(推荐) 按现形状批准;小修清单作为撤 draft 前提 作者约半天小修 无超出已披露范围的风险
B 小修落地后再批准 多一轮审核往返 排期延迟
C 否决形状,改替代方案(如纯精确匹配) 作者重做匹配层+文档 失去家族前缀便利

推荐 A:形状贴合既有 dsh.* 段惯例、opt-in 且文档完备,小修清单是合并前提而非契约缺陷。若批准,请作者落地:① title-request 作用域决策 + 测试;② 四条缺失测试行;③ 两句文档(blast radius、坏配置边缘);然后 rebase master 再撤 draft。

不决定的默认行为:PR 保持 draft,不合并、不再推进,等待你的拍板。

收工判定:代码质量高、CI 绿、方向不跑偏——可进入契约审批;契约批准后补齐小修清单 + rebase 即可撤 draft 待合。本 bot 不关闭、不合并该 issue/PR(owner 权限)。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)

Status note after two daemon restarts mid-task (the work finished before the last one fired — nothing lost):

  • Done: full independent review of GitHub [PR] feat(dsh): route models between stock native and bili compaction #6123 is posted above (floor 5) — diff-walked verification, punch-list, behavior-change disclosure, structured 八问, and the 🔶 需要决策 ask.
  • Verified live: CI green at head a0ece877 (30 checks, 0 failed); PR draft + mergeable + behind master; labels set (dsh, scope/wiring, p3, pr, needs-decision).
  • Outcome: code quality high, no regression found at default config ([] = byte-identical to today); no forced alignment-refactor needed.
  • What remains: your sign-off on the dsh.nativeCompactionModels contract (recommended: Option A — approve shape as-is), then the author lands the small punch-list (title-request scoping + test, 4 missing test rows, 2 doc sentences) and rebases before undrafting.
  • Risk if left undecided: none accumulates — PR stays draft, zero user impact until merged.

I will not close or merge anything (owner-only). Waiting on your call.

@bluesmilery bluesmilery changed the title [PR] feat(dsh): per-model native compaction with safe session handoff feat(dsh): route models between stock native and bili compaction Nov 11, 2026
@ranxianglei ranxianglei changed the title feat(dsh): route models between stock native and bili compaction [PR] feat(dsh): route models between stock native and bili compaction Nov 11, 2026
@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[bot] (ai: vllm-qwen/qwen3.8-27b)

进度汇报(进程被强制重启后恢复):

我是本 PR 的 CI 工程师(11-12 两次系统指派「上游 PR 冲突(dirty),冲突与红项由 CI 工程师一次处理」)。上次会话在同步 master 阶段卡住被重启,无阶段性成果丢失——工作树干净,恢复后已重新核实全部状态:

当前实况(刚刚核实):

  • PR [PR] feat(dsh): route models between stock native and bili compaction #6123 仍为 draft,mergeable_state: dirty(与 master 冲突)
  • head c4a91e9c4d(bluesmilery fork 分支 2026-11-10_dsh-model-native-compaction,6 commits / 27 files,作者最后推送 11-11 13:13Z,此后未动)
  • master 已推进到 259cd87674(比 PR 的 merge-base 4dea18eabf 新,冲突来源确认)
  • maintainer_can_modify: true → 我可以直接向 fork 分支推送合并结果,无需作者操作

接下来(本次会话继续执行):

  1. 取 PR head → 把 master 259cd87674 合并进 PR 分支
  2. 解决冲突(以 PR 意图 + master 现状取并集,不丢任何一侧语义)
  3. 推送回 fork 分支 → CI 自动重跑
  4. 盯 CI(读镜像缓存,不轮询 GitHub),红项定向排查修复
  5. 完成后按八问体例汇报

预计 30–60 分钟内给出冲突解决结果。若中途再遇阻塞会立即汇报,不会静默卡住。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)

PR #6123 冲突 + 红项处理进度(进程重启后接续)

1. 冲突已解决并推送。 把 origin/master(259cd87674,领先 1111 提交)合入 PR 分支,唯一冲突在 scripts/live-files.mjs——两边各往 CI 端口区清单追加了新测试文件,按并集解决(保留 PR 的 tests/dsh-llm-stream-attribution.test.ts + master 的 tests/pack-install.test.ts、tests/ci-janitor-fork-heads.test.ts;每个文件各占独立端口区槽位,顺序无语义)。合并提交 9368f6154c 已推到 bluesmilery:2026-11-10_dsh-model-native-compaction,PR 不再是 dirty。

2. 本地验证(§7.2:全量回归交给 CI):npm run typecheck ✅、npm run build ✅(build-info commit=9368f6154c);针对双方都改过的文件跑了定向测试(native-intercept / native-ws-intercept / dsh-native-compaction / dsh-llm-stream-attribution 四套):153/154 通过,1 个红项(下面)。

3. 红项 = PR 自带测试的确定性缺陷,根因已钉死,正在修。 失败测试 "bili-only and model-routed bili have identical real proxy folds and forwarded requests"(本 PR 新增)fork 两个独立 proxy 逐字节对比转发请求,但 proxy 盖的 ACP 标签带墙钟 time= 属性——两臂跨秒边界时必然不等。实测 diff 只有 time="03:51:58" vs time="03:52:00",其余字节全同。不是合并回归,是 PR 自带的 flake,CI 上大概率红。修法:对比前归一化 time= 属性(测试意图是验证路由不改变 fold/payload,时间戳不是语义差异)。

4. CI:新 head 已推送在跑,走镜像缓存查看(不轮询),flake 修复 + CI 结果出来后给最终八问。

八问(当前状态)

  1. 是什么问题:PR [PR] feat(dsh): route models between stock native and bili compaction #6123 与 master 合并冲突(dirty);PR 新增测试有确定性缺陷。
  2. 什么原因:master 前进 1111 提交,双方都在 scripts/live-files.mjs 端口区清单追加条目 → 文本冲突;测试对比两臂转发请求全字节,而 ACP 标签含实时时间戳 → 跨秒即不等。
  3. 影响范围与严重程度:冲突只挡 PR 合并,无用户影响;flake 只影响本 PR 的 CI(大概率红),无生产行为影响。
  4. 怎么修复的:冲突取并集;flake 在对比前归一化 time= 属性,保留原断言意图。
  5. 是否有回归问题:逐项核过——PR 侧改动(dsh-native-compaction 新模块、nativeCompactionBypass、takeoverGate、config key、docs)与 master 侧改动([Feature] Declarable custom-wire model endpoints — route providers like commandcode's Go plan (/alpha/generate) into compression #1295 model-endpoints、[Bug][dsh] watermark fastpath never hits: the client never sends x-bili-pf-count because pfRequestHeaders is handed the pre-merge headers object #5813 pf 头合并视图、WS listener 重构、Remove the compressAtFoldPoint feature — it reorders resent history and caused an authorship-misattribution incident in a live session #6132 compressAtFoldPoint 移除)在合并树中全部保留;双方都碰的 takeoverGate 正确合成(PR 的 bypass 状态赋值 + master 的 [Feature] Declarable custom-wire model endpoints — route providers like commandcode's Go plan (/alpha/generate) into compression #1295 声明端点检查)。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及(dsh.nativeCompactionModels 是 PR 自身内容,仍待 owner 批准,本次处理未动)。

判定:冲突解决完成、已推送;红项根因已钉死、修复进行中;CI 绿后给最终结论。

The parity test compares forwarded payloads across three forked proxy arms with deepEqual, but the kernel stamps wall-clock yyyy-mm-dd hh:mm:ss timestamps into the ACP tag time= attribute and the compress tool-result block time range. Arms running on different seconds differ in those bytes alone, so the comparison flaked. Mask every wall-clock timestamp before the cross-arm comparison (same sanctioned normalization as issue5403-watermark-fastpath.test.ts).
@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)

Independent review of PR #6126 (GitHub #6123) — complete.

I completed a full independent end-to-end review of the PR (head 08bf768, 27 files, +959/-27).

Verdict: 🔶 需要决策 — config contract pending owner sign-off

The code is clean (no blocking findings). However, this is a DRAFT feature PR that introduces a new config field dsh.nativeCompactionModels. Per Configuration Surface Discipline (owner-gated), a new config field requires owner sign-off BEFORE implementation. I confirm the needs-decision routing from the prior review (floor 5) with my own independent analysis.

I do NOT approve — not because the code is deficient, but because the config contract requires owner sign-off. The PR body itself states: "This PR is draft for maintainer review of the configuration/ownership contract. No maintainer approval, merge or release is implied."

What I verified

  • kernel/ and pi-subagents/ UNTOUCHED — zero files under kernel/ or pi-subagents/ in the diff. No kernel-change declaration. The HARD RULE (kernel gate) does NOT apply.
  • Default [] = zero change — with no config, the wire is byte-identical to today. Opt-in only.
  • Tests have teeth — 7 both-directions unit tests, e2e A/B (native/bili/native switch + bili-only vs routed-bili parity via forked proxies), real-DSH integration script, WS socket direct + refuse-reuse, native-intercept bypass bytes/headers.
  • Docs/config/build surfaces consistent — en/zh docs, configuration.md, architecture.md, index.md, README.zh-CN.md, reference/architecture.md, website/config-reference/server.yaml, package.json exports, tsup.config.ts, check-unused-exports.mjs, live-files.mjs — all updated in the same PR.
  • CI green per dispatch (mirror cache stale at 08bf768, ~8h old; trusting dispatch).

Findings (all non-blocking, already in floor 5 punch-list)

  1. Title-request zombie ledger (iso + gen≥1): title requests use raw sid while main traffic is scoped → phantom conversation accumulates; untested.
  2. Fail-closed blast radius (iso + DSH build lacking session.surface.replaceGeneration): every conversation-id call throws → even bili models lose bili tools; should be disclosed in PR Behavior section.
  3. Malformed-config edge: invalid entry throws at lane activation; preset keeps stock compaction-basic armed without bili tools; one doc sentence needed.
  4. Missing test rows (4): client React probe path, /bili/origin?sessionId= policy face, title-request behavior, ready-set miss with valid id.
  5. Nits: noteGateCoverage skipped on noBackend branch; WS owner check on create-frames only (deemed fine); attachEngine ~90L could split.

None blocking. All are disclosure/doc/test-coverage items already noted in floor 5.

8问 (structured review checklist)

  1. 是什么问题: 这是一个 DRAFT 功能 PR,为 dsh 车道新增模型路由能力——让指定模型走 stock native compaction,其余模型走 bili compaction。
  2. 什么原因导致的: 不是 bug 修复,是功能需求——dsh 用户希望某些模型保留宿主原生压缩,其余模型使用 bili 压缩管线。
  3. 影响范围与严重程度: 默认 [] = 零变更(wire 字节级一致),仅 opt-in 生效。严重程度:无(默认不影响任何现有用户)。
  4. 怎么修复的: 新增 dsh.nativeCompactionModels 配置字段 + dsh-native-compaction.ts 模块 + dsh-compaction-disable.ts 选择性接入 + dsh-native.ts 工具/状态/流路由 + native-intercept.ts HTTP bypass + native-ws-intercept.ts WS 帧准备。
  5. 是否有回归问题: 审了以下既有行为——默认路径(零变更,保持);dsh compaction disable 分支(新增 selective 分支,原有路径不变);native-intercept HTTP 路径(新增 bypass 前置分支,原有 bili gates 不变);native-ws-intercept WS 帧(新增参数,原有 owner-change 检查不变);pf 水位(native 时跳过,原有路径不变)。无回归。
  6. 是否破坏缓存: 不涉及——pf 水位在 native 时跳过(设计意图),原有 bili 模型的 pf 路径不变。
  7. 是否改了设计方向: 是——新增模型路由维度(native vs bili compaction),在现有 dsh 车道内扩展,不改变整体架构。
  8. 是否引入了新的配置: 是——新增 dsh.nativeCompactionModels(数组,默认 [])。owner-gated 配置表面变更,需要 owner 签核。

收工判定

代码质量高,测试有牙,文档/配置/构建表面一致,默认零变更。但这是 DRAFT 功能 PR + 新配置字段,需要 owner 签核配置契约。不批准——路由到 🔶 需要决策。needs-decision 标签已由 floor 5 打好。

注: add-label.sh 在 tools/ 目录中不存在(仅有 analyze-dumps.mjs / build-blog.mjs / check-architecture-docs.mjs / gen-config-docs.mjs),但 needs-decision 标签已存在于 issue 上,无需操作。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)

CI-engineer run complete: conflict resolved + red item fixed, both pushed, CI green on the new head.

What I did this run

  1. Resolved the merge conflict. Merged origin/master into the PR branch and resolved the one real conflict (tests/fixtures/live-files.mjs — took the union of both sides' entries so master's new files and the PR's files are both present). Verified no leftover conflict markers and that all master-side changes survived the merge ([Feature] Declarable custom-wire model endpoints — route providers like commandcode's Go plan (/alpha/generate) into compression #1295 model-endpoints, [Bug][dsh] watermark fastpath never hits: the client never sends x-bili-pf-count because pfRequestHeaders is handed the pre-merge headers object #5813 pfRequestHeaders merged-view, Remove the compressAtFoldPoint feature — it reorders resent history and caused an authorship-misattribution incident in a live session #6132 compressAtFoldPoint removal, WS DeferredListener rework). Local typecheck and build both green.
  2. Found and fixed a red item. The PR's new test bili-only and model-routed bili have identical real proxy folds and forwarded requests (tests/dsh-llm-stream-attribution.test.ts) was flaky: it compares forwarded payloads across 3 forked proxy arms with deepEqual, but the kernel stamps wall-clock yyyy-mm-dd hh:mm:ss timestamps into the ACP tag time= attribute and the compress tool-result's block time range, so arms running on different seconds differ in those bytes alone. Fixed by masking every wall-clock timestamp before the cross-arm comparison (same sanctioned normalization as issue5403-watermark-fastpath.test.ts). Test is now stable (4 consecutive passes); all 4 targeted test files 154/154 green.
  3. Pushed both commits to the fork branch — head is now 08bf768002 (merge + test fix).
  4. Verified CI green on 08bf768002: 38 success, 14 skipped (gated e2e lanes), 0 failed.

结构化八问

  1. 是什么问题:PR 与 master 产生合并冲突(merge state dirty)无法合并;另外 PR 新增的 dsh 压缩 parity 测试存在一个不稳定的红项,会导致 CI 偶发/必然失败。
  2. 什么原因导致的:①冲突——master 侧 [Feature] Declarable custom-wire model endpoints — route providers like commandcode's Go plan (/alpha/generate) into compression #1295/[Bug][dsh] watermark fastpath never hits: the client never sends x-bili-pf-count because pfRequestHeaders is handed the pre-merge headers object #5813/Remove the compressAtFoldPoint feature — it reorders resent history and caused an authorship-misattribution incident in a live session #6132 等改动与 PR 改动在 live-files.mjs 等文件上重叠。②红项——该测试用 deepEqual 跨 3 个 fork 出的 proxy arm 比较转发 payload,但 kernel 会把墙钟时间 yyyy-mm-dd hh:mm:ss 盖进 ACP tag 的 time= 属性和 compress 工具结果的 block 时间范围,不同秒运行的 arm 在这些字节上必然不同(是测试比较逻辑缺陷,不是产品代码 bug)。
  3. 影响范围与严重程度:冲突直接阻塞 PR 合并;红项使该测试在 CI 上不稳定(跨秒即失败),但不影响功能正确性,只影响 CI 可信度。
  4. 怎么修复的:①冲突——merge master 进 PR 分支,live-files.mjs 取两侧并集。②红项——跨 arm 比较前 mask 掉所有墙钟时间戳(与 issue5403-watermark-fastpath.test.ts 同一套认可的归一化),比较仍覆盖完整 payload 语义。
  5. 是否有回归问题:无。冲突解决完整保留 master 侧改动,无残留冲突标记;测试修复只改测试比较逻辑、不动产品代码。本地 typecheck/build 绿、4 个定向测试文件 154/154 绿、CI 全绿(38 success / 14 skipped / 0 failed)。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及。

判定:冲突已解、红项已修、CI 绿,PR 分支 head = 08bf768002,可进入正常 review/合并流程(PR 当前为 draft,是否 un-draft 与合并由 owner 决定)。

@ranxianglei ranxianglei left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(ai: vllm-qwen/qwen3.8-27b)

Independent review — code is clean, but this is a DRAFT feature PR with a new config field requiring owner sign-off.

I completed a full independent end-to-end review of the PR (head 08bf768, 27 files, +959/-27).

Verdict: 🔶 需要决策 — config contract pending owner sign-off

The code is clean (no blocking findings). However, this is a DRAFT feature PR that introduces a new config field dsh.nativeCompactionModels. Per Configuration Surface Discipline (owner-gated), a new config field requires owner sign-off BEFORE implementation. I confirm the needs-decision routing from the prior review with my own independent analysis.

I do NOT approve — not because the code is deficient, but because the config contract requires owner sign-off. The PR body itself states: "This PR is draft for maintainer review of the configuration/ownership contract. No maintainer approval, merge or release is implied."

What I verified

  • kernel/ and pi-subagents/ UNTOUCHED — zero files under kernel/ or pi-subagents/ in the diff. No kernel-change declaration. The HARD RULE (kernel gate) does NOT apply.
  • Default [] = zero change — with no config, the wire is byte-identical to today. Opt-in only.
  • Tests have teeth — 7 both-directions unit tests, e2e A/B (native/bili/native switch + bili-only vs routed-bili parity via forked proxies), real-DSH integration script, WS socket direct + refuse-reuse, native-intercept bypass bytes/headers.
  • Docs/config/build surfaces consistent — en/zh docs, configuration.md, architecture.md, index.md, README.zh-CN.md, reference/architecture.md, website/config-reference/server.yaml, package.json exports, tsup.config.ts, check-unused-exports.mjs, live-files.mjs — all updated in the same PR.
  • CI green per dispatch.

Findings (all non-blocking, already in prior review punch-list)

  1. Title-request zombie ledger (iso + gen≥1): title requests use raw sid while main traffic is scoped → phantom conversation accumulates; untested.
  2. Fail-closed blast radius (iso + DSH build lacking session.surface.replaceGeneration): every conversation-id call throws → even bili models lose bili tools; should be disclosed in PR Behavior section.
  3. Malformed-config edge: invalid entry throws at lane activation; preset keeps stock compaction-basic armed without bili tools; one doc sentence needed.
  4. Missing test rows (4): client React probe path, /bili/origin?sessionId= policy face, title-request behavior, ready-set miss with valid id.
  5. Nits: noteGateCoverage skipped on noBackend branch; WS owner check on create-frames only (deemed fine); attachEngine ~90L could split.

None blocking. All are disclosure/doc/test-coverage items already noted in the prior review.

收工判定

代码质量高,测试有牙,文档/配置/构建表面一致,默认零变更。但这是 DRAFT 功能 PR + 新配置字段,需要 owner 签核配置契约。不批准——路由到 🔶 需要决策。

Resolves the two doc/config conflicts from master's Japanese-docs +
config-coverage work:
- docs/architecture.md: union (keep PR's DSH native-model-policy intro
  line + master's en/zh/ja hub line).
- website/config-reference/server.yaml: keep the PR's feature-aware
  dsh section desc (wire guard refuses UNMANAGED native compaction,
  nativeCompactionModels bypasses it) over master's stale
  'refused unconditionally' wording; add the desc_ja that master's
  new gen-config-docs check-coverage now requires on every entry for
  dsh.nativeCompactionModels / .model / .provider.

No code changes; config-coverage and architecture-docs guards green.
@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)

PR #6123 冲突再次处理完成(master 在 11-12 之后又前进了 140 提交,触发新一轮 dirty 派发)。

状态核实(推送后单次 GET 确认,非轮询):

  • 新 head d98db520ca(正确的 2 父合并:08bf768002 + master 36a04a7986)
  • mergeable: true,mergeable_state: blocked —— 不再是 dirty(blocked 只因仍是 draft,owner un-draft 后即 clean)
  • behind_by: None(不再落后 master);draft 保持不动(撤 draft / 合并是 owner 权限)

这次做了什么

  1. 发现工作树是上次进程被 daemon 重启打断的残破合并态:87 文件已暂存 + 2 文件未合并,但 MERGE_HEAD 已丢失——此时直接 commit 会变成单父提交、丢掉 master 父链。先 git reset --hard 回已推送的干净 head 08bf768002,重新 git merge origin/master,得到正确的 2 父合并。
  2. 两个冲突都是文档/配置(无代码):
    • docs/architecture.md:取并集——保留 PR 的 DSH native-model-policy 引言行 + master 的 en/zh/ja hub 行。
    • website/config-reference/server.yaml:语义冲突——PR 的 dsh 段描述是「线级守卫拒绝未受管原生压缩,nativeCompactionModels 绕过它」(feature-aware),master 是「无条件拒绝」(feature 之前的旧措辞)。保留 PR 的 feature-aware 版本——master 的「无条件拒绝」在合并后会与紧随其下的 nativeCompactionModels 条目自相矛盾。
  3. 抓到并修掉一个会红 CI 的坑:master 这批提交给 tools/gen-config-docs.mjs 加了「每个配置条目必须有非空 desc_ja」的强制校验(check-coverage),但 PR 新增的 dsh.nativeCompactionModels / .model / .provider 三条只有 en/zh。上次会话留下的合并解法漏了这三条的 desc_ja——直接推上去 check-coverage 必红。已按文件既有 ja 风格补齐三条 desc_ja。
  4. 本地定向验证(相关守卫):gen-config-docs check-coverage 绿(204 env + 63 top-level keys 全覆盖)、check-architecture-docs 绿。未跑本地 typecheck/build——本工作区 node_modules 为空且历史有磁盘压力(floor 45/47 报过 2MB/175MB 剩余),全量本地构建不可行且属 §7.2 禁止的本地全跑;本次改动纯文档/配置(非 TS),其余 193 个暂存文件全是 master 已 CI 绿的改动,全量 typecheck+build+test 交给 CI 在新 head 上把关。

结构化八问

  1. 是什么问题:PR 与 master 再次合并冲突(master 又前进 140 提交,触发新的 dirty 派发)。
  2. 什么原因导致的:master 侧新增日语文档 + 配置 desc_ja 强制校验,与 PR 改动的 docs/architecture.md、server.yaml 重叠 → 文本 + 语义双重冲突;且 PR 的新配置条目缺 master 新要求的 desc_ja。
  3. 影响范围与严重程度:只挡 PR 合并,无用户影响;若漏补 desc_ja 会让 CI check-coverage 红(已修)。
  4. 怎么修复的:reset 回干净 head 重新做 2 父合并;两冲突取并集 / 保留 feature-aware 语义;补齐 3 条 desc_ja。
  5. 是否有回归问题:无。冲突解决完整保留 master 侧全部改动(193 文件)与 PR 侧 dsh-native-compaction 功能;server.yaml 保留 PR 的 feature-aware 描述(否则与 nativeCompactionModels 条目矛盾);未动任何代码。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及(dsh.nativeCompactionModels 是 PR 自身内容,仍待 owner 批准;本次只补了它的 ja 文档字段)。

判定:冲突已解、会红 CI 的 desc_ja 缺口已补、已推送 d98db520ca,PR 不再是 dirty(blocked 仅因 draft)。CI 在新 head 上跑,绿后由 owner 决定是否 un-draft / 合并。本 bot 不撤 draft、不合并、不关闭(owner 权限)。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)

Re-review at new head d98db52 — verdict unchanged: 🔶 需要决策

The new head is a pure master sync (merge commit d98db520ca). All PR-specific source files (src/agent/dsh-native-compaction.ts, dsh-native.ts, dsh-compaction-disable.ts, dsh-native-client.ts, native-intercept.ts, native-ws-intercept.ts, src/config.ts) are byte-identical to the previously reviewed head 08bf768002. No new code, no new findings.

Verdict stands: code clean, no blocking findings, but the new config field dsh.nativeCompactionModels requires owner sign-off per Configuration Surface Discipline. Awaiting owner decision on the config contract.

@ranxianglei

Copy link
Copy Markdown
Owner

(ai: vllm-qwen/qwen3.8-27b)

Re-review at head d98db52 — pure master sync, all PR-specific source files byte-identical to the previously reviewed head 08bf768. Verdict unchanged: 🔶 需要决策 (config contract pending owner sign-off). No new findings.

Resolves the one code conflict in src/agent/dsh-native.ts (master moved
265 commits past the previous merge base 36a04a7):
- PluginContext.tools type: union of the PR's register {when} conditional
  (native-compaction model gating) and master's new tools.get? method.
- restoreTools register call: keep master's host-owned-lifetime structure
  (owner.ctx.tools.register(definition), ranxianglei#6702/ranxianglei#3380) and re-attach the
  PR's {when} predicate so bili tools stay hidden on native-owned models.
  definition is the same toolDefinition(tool) master pre-builds into
  owner.definitions (line 1084), so behavior is identical to the PR's
  inline registration.

Verified locally: typecheck + build green; dsh-native-compaction +
dsh-native targeted suites 83/83 pass.
…l-native-compaction

# Conflicts:
#	src/agent/dsh-compaction-disable.ts
@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)

Re-review at head 15efcee — verdict unchanged: 🔶 需要决策

Pure master sync (merge 15efcee54d3 ← master 04ecbb42dd3). PR-specific commits and source code are identical to the previously reviewed head 7bb296624. Diff: 28 files, +967/-29 — unchanged.

No new findings. Awaiting owner decision on the dsh.nativeCompactionModels config contract.

@ranxianglei

Copy link
Copy Markdown
Owner

(ai: vllm-qwen/qwen3.8-27b)

Re-review at head 15efcee — pure master sync, PR code identical to prior head. Verdict unchanged: 🔶 需要决策 (config contract pending owner sign-off). No new findings.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

Merge conflict resolved — the PR is now mergeable: true and the full CI run on the new head 15efcee54d37 is all green (38 success / 14 skipped check runs, all 12 check suites success).

What I did this run:

  1. Verified live state first — PR head 7bb2966240 vs base; live master had moved to 04ecbb42dd (the PR's last sync was 548e396022, so ~2 days of master work conflicted).
  2. Merged origin/master into the branch (merge, not rebase — no force-push needed). Exactly ONE conflict: src/agent/dsh-compaction-disable.ts, where the PR's new selectiveBasicCompaction() (DSH: select models for native compaction with safe same-session handoff #6121 selective dsh compaction) and master's new dsh runtime-registered presets are not covered by the compression-disable gate: per-step 422 storm during compression + | dsh 运行时注册的 preset 不受压缩禁用闸门覆盖:压缩每步 422 风暴 + 换模型死锁 + 落地 checkpoint 反噬折叠(#7062/#7169/#7178 同源) #7190 runtime-preset-coverage block (PRESET_REGISTER_WRAP_MARK / presetRegistryOf / disableRuntimePresetCompaction / installRuntimePresetCoverage) were both inserted at the same spot after disableBasicCompaction.
  3. Resolution = pure union. The two additions are independent (different functions, different call sites — the auto-merged lower part of the file already calls BOTH: selectiveBasicCompaction in the internal/config transform and installRuntimePresetCoverage at the end of registerCompactionDisable). No semantics were dropped from either side; no design decision involved.
  4. Local verification before push: npm run typecheck clean; targeted suites for the conflicted file from BOTH sides 17/17 pass (tests/dsh-native-compaction.test.ts + tests/issue7190-dsh-runtime-preset-coverage.test.ts); the PR's other touched suites 149/149 pass; gen-config-docs.mjs generate shows zero drift (master's new seed entry already carried by the auto-merged docs); check-architecture-docs.mjs all green (328 src files covered, no ghosts).
  5. Pushed the merge commit 15efcee54d37 (plain push; remote branch verified not to have moved before pushing; single push, no [ework:ci-held] intermediates).
  6. Re-verified live after push: mergeable: true; every check run on the head commit is success/skipped — all 12 test shards, static-gates, docs-sync, architecture-docs, all guard jobs, plus all e2e workflows and the build-artifact run.

八问:

  1. 是什么问题:PR 分支与 master 产生合并冲突(merge state: dirty),无法合并。
  2. 什么原因导致的:分支最后一次同步 master 停在 548e396022,其后 master 合入了 dsh runtime-registered presets are not covered by the compression-disable gate: per-step 422 storm during compression + | dsh 运行时注册的 preset 不受压缩禁用闸门覆盖:压缩每步 422 风暴 + 换模型死锁 + 落地 checkpoint 反噬折叠(#7062/#7169/#7178 同源) #7190(dsh 运行时 preset 覆盖)等变更,与 PR 在同一文件同一位置(dsh-compaction-disable.ts 的 disableBasicCompaction 之后)各自新增了函数,文本冲突。
  3. 影响范围与严重程度:仅阻塞 PR 合并;无运行时影响。
  4. 怎么修复的:把当前 master 合入分支,唯一冲突按「纯并集」解——PR 的 selectiveBasicCompaction 与 master 的 dsh runtime-registered presets are not covered by the compression-disable gate: per-step 422 storm during compression + | dsh 运行时注册的 preset 不受压缩禁用闸门覆盖:压缩每步 422 风暴 + 换模型死锁 + 落地 checkpoint 反噬折叠(#7062/#7169/#7178 同源) #7190 运行时覆盖块各自独立、互不覆盖,文件下半部(自动合并区)本来就在同时调用两者,并集即双方意图的并。
  5. 是否有回归问题:无。本地 typecheck 干净;冲突文件两侧各自的回归套件 17/17 全过;PR 其余触及的测试套件 149/149 全过;新 head 上 CI 全量 12 分片 + 全部 guard 作业实测 success。
  6. 是否破坏缓存:不涉及(纯合并冲突解决,无运行时语义改动)。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及。

收工判定:冲突已解、CI 全绿,PR 处于可合并状态;当前 mergeable_state=blocked 仅剩人工 review 审批(本 PR 为 feat 类,按 §7.4 属 human-only 档),等 reviewer/owner 批准,合并动作由人执行。

…l-native-compaction

# Conflicts:
#	reference/architecture.md
#	src/agent/dsh-native.ts
@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)

Re-review at head d313e83 — verdict unchanged: 🔶 需要决策

Pure master sync (merge d313e834ff6 ← master 328fdebdb41). PR-specific commits and source code are identical to the previously reviewed head 15efcee54. Diff: 28 files, +967/-29 — unchanged.

No new findings. Awaiting owner decision on the dsh.nativeCompactionModels config contract.

@ranxianglei

Copy link
Copy Markdown
Owner

(ai: vllm-qwen/qwen3.8-27b)

Re-review at head d313e83 — pure master sync, PR code identical to prior head. Verdict unchanged: 🔶 需要决策 (config contract pending owner sign-off). No new findings.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

Merge conflict resolved — the PR is now mergeable: true and the full CI run on the new head d313e834ff6f is all green (38 success / 14 skipped check runs; main CI run completed success, 27 jobs).

What I did this run:

  1. Verified live state first — PR head 15efcee54d37 was dirty against base; live master had moved to 328fdebdb4 (the PR's last sync was 04ecbb42dd, ~4 days of master work).
  2. Merged origin/master into the branch (merge, not rebase — no force-push needed). Two files conflicted:
  3. Local verification before push: npm run typecheck clean; targeted suites for the conflicted areas from BOTH sides 17/17 (tests/dsh-native-compaction.test.ts + tests/issue7190-dsh-runtime-preset-coverage.test.ts); the PR's attribution + auto-merged intercept suites 153/153; gen-config-docs.mjs generate zero drift; check-architecture-docs.mjs all green.
  4. Pushed the merge commit d313e834ff6f (plain push; verified the fork branch head had not moved before pushing; single unmarked push — this branch's one full CI pass).
  5. Re-verified live after push: mergeable: true; every check run on the head commit is success/skipped — all 12 test shards, static-gates, docs-sync, architecture-docs, all guard jobs, plus all e2e workflows and the build-artifact run.

八问:

  1. 是什么问题:PR 分支与 master 再次产生合并冲突(merge state: dirty),无法合并。
  2. 什么原因导致的:分支上次同步停在 04ecbb42dd,其后 master 合入了 msgid Delivery gap: envelope channel (biliMsgIds) has zero client wiring; dsh/omp openai primary lane and R1 prefix have | msgid 递送缺口:信封通道(biliMsgIds)零客户端接线,dsh/omp openai 主力车道与 R1 前缀无宿主号(覆盖矩阵+接线计划) #6525(全量重发信封)、[Design][dsh] Stop guessing dsh's auxiliary requests — the in-process plugin can declare each request's purpose explicitly #6880(dispatch purpose)、提案:fork 继承四原则(msgid 身份轨 / lineage 编号 / 无状态账本 / 纯块拷贝) #6262(msgid track)等变更,与 PR 在 dsh-native.ts 的同一接口/同一调用点各自新增字段与参数,文本冲突。
  3. 影响范围与严重程度:仅阻塞 PR 合并;无运行时影响。
  4. 怎么修复的:把当前 master 合入分支,两处冲突文件按「纯并集」解——PR 的会话隔离路由(compactionConversationId)与 master 的 toolCallId 透传、messages 信封字段各自正交,并集即双方意图的并;接口新增必填字段 messages 后,唯一构造点同步补上。
  5. 是否有回归问题:无。本地 typecheck 干净;冲突双方各自回归套件 17/17 全过;PR 其余触及的测试套件 153/153 全过;新 head 上 CI 全量 12 分片 + 全部 guard 作业实测 success。
  6. 是否破坏缓存:不涉及(纯合并冲突解决,无运行时语义改动)。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及。

收工判定:冲突已解、CI 全绿,PR 处于可合并状态;当前 mergeable_state=blocked 源于 PR 仍是 draft 且为 feat 类(按 §7.4 属 human-only 档),等作者/owner 转 ready 并批准,合并动作由人执行。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)

Status — re-review round closed, state re-verified just now.

The dispatch this run was a self-forward: the message forwarded to me (upstream comment 7101733633) was my own re-review comment posted at 12:51Z (floor 97), mirroring back — no new upstream input, so no rework was needed. I re-verified the live state instead of re-doing the review:

Live state (verified 2026-11-23 ~20:55 UTC):

  • Head d313e834ff6f — unchanged since the CI engineer's conflict-resolution push at 12:52Z.
  • CI (mirror cache): 30 checks, 0 failed, 0 pending — green.
  • mergeable: true, behind_by: None (no longer behind master), mergeable_state: blocked — blocked only because the PR is still draft.
  • Verdict stands: 🔶 需要决策 — the dsh.nativeCompactionModels config contract awaits your sign-off (recommended Option A: approve shape as-is, per floor 5).

What remains (unchanged since floor 5, all pre-undraft punch-list, none blocking the contract decision):

  1. Title-request scoping decision + test row (gen≥1 phantom raw-id ledger).
  2. Four missing test rows (client React probe, /bili/origin?sessionId= policy face, title-request behavior, ready-set miss with valid id).
  3. Two doc sentences (fail-closed blast radius; malformed-config edge).
  4. Then undraft — merge stays with you (feat-class, human-only per §7.4).

Risk if left undecided: none accumulates — PR stays draft, zero user impact until merged; the branch is already synced to master and green.

结构化八问(本轮)

  1. 是什么问题:PR [PR] feat(dsh): route models between stock native and bili compaction #6123 为 DSH 车道新增按模型的压缩归属路由(指定模型走宿主原生压缩、其余保留 bili,同会话可切换);DRAFT 功能 PR,配置契约待 owner 签核。
  2. 什么原因导致的:非 bug——现有配置面只能表达「怎么压」,表达不了「谁拥有压缩」;Remove dsh.allowDshCompaction escape hatch (unconditional wire refusal) | 移除 allowDshCompaction 配置:dsh 原生压缩一律拦截 #3666 之后未受管原生压缩被线级守卫一律拒绝,按模型归属通道不存在。
  3. 影响范围与严重程度:默认 [] 零变更(wire 字节级一致,CI 绿 + e2e A/B 实证);仅显式配置的 profile 中被列出的模型受影响。现有用户零影响,属新增 opt-in 能力。
  4. 怎么修复的:配置声明每模型归属(trailing-* 前缀匹配)+ 预设隔离 realm 内策略适配器按选中模型门控原生压缩并隐藏 bili 工具;原生请求在任何 bili 改写之前绕过;宿主历史替换后派生 |dsh-generation:N 独立命名空间(重启存活)。
  5. 是否有回归问题:无。默认路径字节级不变;全链路 fail-visible(无吞错);无阈值/时序/输出格式漂移;kernel/ 与 DSH core 文件未动。残留非回归项:title 请求 gen≥1 写 raw-sid 幻影账本(小修清单第 1 条)。
  6. 是否破坏缓存:不破坏。原生请求不经 bili;generation 边界处增量车道与水位种子主动重建(宁重发不读旧);scoped 会话 id 是新存储命名空间,与旧行无交叉污染。
  7. 是否改了设计方向:无转向——复用 KDD release v0.1.2 #9 命名空间惯例与 [dsh] Disabling the plugin permanently bricks dsh session creation - the bundle patch inject gate has no fallback (0.1.199 / dsh 0.2.1-rc.2) #3662 门禁闩锁语义,nudge 死锁无检测:同一 session 交替收到两种结构互斥的请求流(巨型单消息 ↔ 多轮)时不告警 #1729 线级守卫保持为未受管原生压缩的兜底;仅新增一条受管 opt-in 通道。
  8. 是否引入了新的配置:是——dsh.nativeCompactionModels({provider?: string, model: string}[],默认 [],file-only 无 env 变量,en/zh/ja 文档与 yaml 种子齐备)。存量安装无需迁移。

收工判定:本轮无新发现、无新动作——PR 绿、可合并(仅 draft 状态阻塞),等待你对配置契约拍板;拍板后作者补小修清单 + 撤 draft 即可。本 bot 不撤 draft、不合并、不关闭(owner 权限)。

# Conflicts:
#	src/agent/dsh-compaction-disable.ts
@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

PR #6123 冲突再次处理完成(master 自上次同步 328fdebdb4 又前进了 153 提交,触发新一轮 dirty 派发)。

本次做了什么

  1. 核实 live 状态:PR head d313e834f 对 base master 为 dirty;live master 已推进到 85afa7b21(领先 153 提交)。
  2. merge origin/master 进分支(merge 而非 rebase——免 force-push,保留 PR 提交史,与历次一致)。9 个文件双方都改,8 个 git 自动合并干净,唯一冲突在 src/agent/dsh-compaction-disable.ts,且是语义冲突:
    • master 侧把读 entry name 的方式从 this?.entry?.options?.name 修成 entryNameOf(fiber)(其注释明确:cordis 把 this 绑成 null,旧读法永远得 undefined,name 实际在 fiber 参数上),并加了 if (compactionRows === 0) return resolved; 早退;
    • PR 侧在同一位置加了 selective compaction 的 compactionRows === 0 分支(插 noBackend 行),但仍用旧的 this 读法(PR 分支早于 master 该修复分叉)。
    • 解法 = 取 master 的 entryNameOf(fiber) 读法 + 丢弃 master 的早退。理由:① selective 逻辑靠 entryName === DSH_AGENT_PRESET_PACKAGE 判断,若沿用 PR 的旧 this 读法,rawName 恒 undefined → entryName 恒 "unnamed-entry" → noBackend 行永不插入,功能静默失效;② master 的早退会让 PR 的 === 0 分支变死代码,且与下方自动合并区重复声明 const compactionRows。最终该行即 const rawName = entryNameOf(fiber);,其余(selective === 0 分支、selectiveBasicCompaction 末行)完整保留。
  3. 本地验证(§7.2:全量回归交 CI):npm run typecheck ✅、npm run build ✅;冲突文件两侧各自回归套件 17/17(dsh-native-compaction + issue7190-dsh-runtime-preset-coverage);PR 的 attribution + native-intercept 套件 108/108;文档守卫全绿(gen-config-docs check-coverage 209 env + 63 key、check-architecture-docs 340 src 文件无 ghost、config-docs 生成零漂移)。已逐一核对自动合并的 8 个文件两侧改动都在(dsh-native.ts 的 PR 隔离路由 + master 的 isDshGoHost/fetchProxyManifestVersion、config.ts 的 nativeCompactionModels、native-intercept.ts 的 bypass 等)。
  4. 推送 merge commit d48bd5db4(正确 2 父:d313e834f + 85afa7b21)到 fork 分支。无 [ework:ci-held] 标记——这是本地验证过后的最终 head,即本分支唯一一次全量 CI 跑。推送前已确认 fork 分支 head 未移动(无并发推送)。
  5. 推送后核实:PR mergeable: true、mergeable_state: blocked——不再是 dirty(blocked 仅因仍是 draft 且为 feat 类 human-only 档)。镜像 check 缓存尚停留在旧 head(d313e834f,poller 未刷新),CI 在新 head d48bd5db4 上跑,结果以 CI 为准。

结构化八问

  1. 是什么问题:PR 分支与 master 再次合并冲突(merge state: dirty),无法合并。
  2. 什么原因导致的:分支上次同步停在 328fdebdb4,其后 master 前进 153 提交;唯一冲突是语义级——master 修复了「读 entry name 用 this 恒得 undefined」的缺陷(改 entryNameOf(fiber))并加早退,PR 在同一位置叠加了 selective compaction 的 === 0 分支且沿用旧读法,两者文本重叠且语义互相牵制。
  3. 影响范围与严重程度:冲突本身仅阻塞 PR 合并,无运行时影响。但解法有实质影响:若误留 PR 的旧 this 读法,selective 功能的 noBackend 行插入会静默失效(entryName 永不匹配)——已按 master 的正确读法解决。
  4. 怎么修复的:merge master 进分支(不 rebase);唯一语义冲突按「取 master 的 entryNameOf(fiber) 正确读法 + 丢弃会破坏 PR 功能的早退」解,两侧意图(master 的正确性修复 + PR 的 selective 分支)都完整保留;其余 8 个重叠文件 git 自动合并并逐一核验。
  5. 是否有回归问题:无。本地 typecheck/build 绿;冲突文件两侧回归套件 17/17、PR 触及套件 108/108 全过;文档守卫全绿;master 侧 153 提交改动完整保留,无残留冲突标记。
  6. 是否破坏缓存:不涉及(纯合并冲突解决,无运行时/缓存路径改动)。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及(dsh.nativeCompactionModels 是 PR 原有内容,仍待 owner 批准,本次未动)。

判定:冲突已解、本地验证全绿、已推送 d48bd5db4(无 ci-held 标记,本分支唯一一次全量 CI),PR 不再是 dirty(blocked 仅因 draft)。CI 在新 head 上跑,绿后由 owner 决定 un-draft / 合并。本 bot 不撤 draft、不合并、不关闭(owner 权限)。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

本次为陈旧派发(stale dispatch)——冲突已在上一轮解决,本轮无动作。

live 状态(刚刚核实,非凭记忆):

  • master head 仍是 85afa7b21(自上一轮合并后未再前进)。
  • fork 分支 head 是 d48bd5db4——即上一轮我推的 2 父合并(d313e834f + 85afa7b21)。
  • git merge-base --is-ancestor origin/master fork-head = master 已包含在 fork head 内 → 结构上不可能再有冲突。
  • 单次 GET 确认 PR:mergeable: true、mergeable_state: blocked(不再是 dirty;blocked 仅因仍是 draft + feat 类 human-only 档)、draft: true。

为什么收到这条 dirty 派发:镜像 poller 是在旧 head d313e834f 上检测到的 dirty,派发在我上一轮推送 d48bd5db4 落地之前就已生成/排队,故与当前实况不符。

本轮处置:不重做、不重复 rebase、不抢分支(push discipline)——冲突已解、已推、CI 正在新 head d48bd5db4 上跑(本分支唯一一次全量 CI,无 ci-held 标记)。镜像 check 缓存刷新后以 CI 实测为准。

八问(本轮)

  1. 是什么问题:系统再次派发「PR 与 base 冲突(dirty)」,但实况已无冲突。
  2. 什么原因导致的:派发基于旧 head d313e834f 的 dirty 快照,生成于上一轮推送落地之前,属陈旧信号。
  3. 影响范围与严重程度:无——PR 实际已可合并(mergeable: true),仅 draft 状态阻塞合并。
  4. 怎么修复的:本轮无需修复;上一轮已 merge master 85afa7b21 进分支、解唯一语义冲突(dsh-compaction-disable.ts 取 master 的 entryNameOf(fiber) 读法 + 丢弃破坏 PR 功能的早退)、本地验证全绿后推 d48bd5db4。
  5. 是否有回归问题:不涉及(本轮零改动)。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及。

判定:无新动作,PR 已不 dirty,等 CI 在新 head 上跑绿 + owner 决定 un-draft / 合并。本 bot 不撤 draft、不合并、不关闭(owner 权限)。

@ranxianglei

Copy link
Copy Markdown
Owner

(ai: vllm-qwen/qwen3.8-27b)

Merge-delta review at head d48bd5d (d313e83 + master 85afa7b, 153 commits)

The PR's own diff is byte-identical to the previously reviewed head (28 files, +967/-29). This review covers the master sync only.

Conflict resolution — src/agent/dsh-compaction-disable.ts — verified correct, and load-bearing.
The sole manual resolution combines two orthogonal changes:

  1. master's entryNameOf(fiber) fix — the internal/config listener receives (fiber, next) and cordis binds this to null, so the old this?.entry?.options?.name read always yielded undefined;
  2. the PR's selective compactionRows === 0 branch (inserts the noBackend row for the DSH agent preset).

The combination is not a mere union: without master's fix, entryName would be permanently "unnamed-entry", the PR's entryName !== DSH_AGENT_PRESET_PACKAGE check would always early-return, and the noBackend row would never be inserted — the feature would be silently dead. The resolution keeps master's fix, so the feature works. The default path (selective disabled) is byte-identical to master (=== 0 → early return; > 0 → noteGateCoverage + disableBasicCompaction).

8 auto-merged files — clean union, no semantic interaction.
Master-side changes in the overlapping regions: native-intercept.ts (#7106 prompt-mass pricing, #6841 inline-origin serving), dsh-native.ts (#6899 clean manifest-version compare, #6588 Go-host note), config.ts (#7666 degenerateRetry + protectedUserPatterns), docs additive. All orthogonal to the PR's hunks; the PR's lines are preserved line-for-line in every both-side file (verified by line-multiset diff against both parents).

CI: 30/30 checks green on d48bd5d.

Verdict: no new findings. The PR remains a DRAFT feature PR adding the owner-gated dsh.nativeCompactionModels config field; the contract decision (recommended: approve the shape as-is — see the review thread on mirror issue #6126) is still pending with the owner, and the pre-undraft punch list (title-request scoping + test, 4 test rows, 2 doc sentences) is unchanged.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)

Re-review at new head d48bd5d (master sync) — no new findings; verdict unchanged: 🔶 需要决策

The CI engineer's master sync (floor 106) produced head d48bd5d (2 parents: d313e83 + master 85afa7b, 153 commits). I independently verified the merge delta:

  1. PR's own diff unchanged: 28 files, +967/-29 — byte-identical to the previously reviewed head d313e83 (all 19 PR-only files byte-identical to the PR parent).
  2. Sole semantic conflict (src/agent/dsh-compaction-disable.ts) — resolution verified correct, and load-bearing. The final handler keeps master's entryNameOf(fiber) fix (the internal/config listener receives (fiber, next); cordis binds this to null, so the old this?.entry?.options?.name read always yielded undefined) AND the PR's selective compactionRows === 0 branch. Not a mere union: without master's fix, entryName would be permanently "unnamed-entry", the PR's entryName !== DSH_AGENT_PRESET_PACKAGE check would always early-return, and the noBackend row would never be inserted — the feature would be silently dead. The resolution keeps master's fix, so the feature works. Default path (selective disabled) is byte-identical to master.
  3. 8 auto-merged files — clean union, no semantic interaction. Master-side changes in the overlapping regions ([Drive-by] client-local doom gate prices the whole body, not the prompt mass (proxy-down / side-request path) #7106 prompt-mass pricing + [PR] fix: recognize pi-web-access 0.46 shared proxy marker and keep inline traffic off real DNS #6841 inline-origin serving in native-intercept.ts; fetchProxyVersion appends (commit) which isVersionNewer rejects, so #3544 stale-proxy rotation never fires on the dsh-native attach path #6899 manifest-version compare + [dsh] DSH Go Host: Verified Working but Undocumented | [dsh] DSH Go 宿主:实测可用但未文档化 #6588 Go-host note in dsh-native.ts; The <acp> header-line tag attached to the model's own reply in the request was mimicked by the model, causing empty turn | 请求里挂在模型自己回复上的 <acp> 头行标记被模型模仿,导致空回合(对照实验:空停率 7% → 0) #7666 degenerateRetry + protectedUserPatterns in config.ts; docs additive) are all orthogonal to the PR's hunks; the PR's lines are preserved line-for-line in every both-side file (line-multiset diff against both parents).
  4. CI: 30/30 checks green on d48bd5d.

One correction to floor 106: the compactionRows === 0 early return was NOT added by master — it was already in the merge base; the PR replaced it with the selective branch, and the merge kept the PR's restructuring plus master's rawName fix.

Still pending (unchanged from floor 103):

  • Owner decision on the dsh.nativeCompactionModels config contract (recommended Option A: approve the shape as-is) — the PR is a DRAFT feature PR adding an owner-gated config field, so no APPROVE is posted until the contract is signed off.
  • Pre-undraft punch list: title-request scoping decision + test, 4 missing test rows (client React probe, /bili/origin?sessionId= policy face, title-request behavior, ready-set miss with valid id), 2 doc sentences (blast radius, bad-config edge).

结构化八问

  1. 是什么问题: 本轮不是新缺陷——CI 工程师把 master(153 个提交)合入 PR 分支产生新 head d48bd5d,唯一语义冲突在 src/agent/dsh-compaction-disable.ts;本轮审查验证该合并增量是否正确。
  2. 什么原因导致的: 不适用(无缺陷)。冲突源于 master 与 PR 各自重构了同一 handler:master 修 entryName 读取(cordis 把 this 绑成 null,旧读法恒为 undefined),PR 把早退分支改写成 selective 分支。
  3. 影响范围与严重程度: 仅 dsh 车道 compaction 门控路径。已验证:默认路径(selective 关)与 master 字节一致;PR 特性路径因保留 master 的 entryNameOf 修复而可用——若解冲突时保留旧 this 读法,noBackend 行将永不插入、特性静默失效(实际未发生)。
  4. 怎么修复的: 本轮是验证而非修复:对两个父提交做逐行 diff + 9 个双方触碰文件的行多重集比对 + 19 个 PR 独有文件字节比对 + CI 全量(30/30 绿)。
  5. 是否有回归问题: 无。既有行为逐项:默认 selective-off 路径字节同 master;master 侧在重叠文件中的变更([Drive-by] client-local doom gate prices the whole body, not the prompt mass (proxy-down / side-request path) #7106/[PR] fix: recognize pi-web-access 0.46 shared proxy marker and keep inline traffic off real DNS #6841/fetchProxyVersion appends (commit) which isVersionNewer rejects, so #3544 stale-proxy rotation never fires on the dsh-native attach path #6899/[dsh] DSH Go Host: Verified Working but Undocumented | [dsh] DSH Go 宿主:实测可用但未文档化 #6588/The <acp> header-line tag attached to the model's own reply in the request was mimicked by the model, causing empty turn | 请求里挂在模型自己回复上的 <acp> 头行标记被模型模仿,导致空回合(对照实验:空停率 7% → 0) #7666)与 PR hunk 正交无交互;PR 自身 diff 与此前已审 head 完全一致。
  6. 是否破坏缓存: 不涉及——未触碰缓存/重试/游标/去重逻辑。
  7. 是否改了设计方向: 无。
  8. 是否引入了新的配置: 本轮无。PR 的 dsh.nativeCompactionModels 字段形态未变,契约仍在等 owner 拍板(推荐 Option A:按现形态批准)。

收工判定: 合并增量验证通过,无新发现;PR 保持 draft,结论维持 🔶 需要决策——等 owner 对 config 契约拍板后,作者补齐 pre-undraft 清单再 undraft。

协调一行: PR #6123 状态 = 绿(30/30 CI, head d48bd5d, mergeable, 仅 draft 阻塞),合并增量审查通过,无新发现,等待 owner 决策。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)

The forwarded comment is my own merge-delta review (posted to PR #6123 as comment 7147575448, mirrored here at floor 111) — no new input in it. State is unchanged since my full reply at floor 112:

No action needed until the owner decides; the pre-undraft punch list (title-request scoping + test, 4 test rows, 2 doc sentences) stays as pre-undraft items inside that pending decision.

# Conflicts:
#	reference/architecture.md
#	tsup.config.ts
@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

PR #6123 冲突再次处理完成(master 自上次同步 85afa7b21 又前进了 306 提交,触发新一轮 dirty 派发)。

本次做了什么

  1. 核实 live 状态:PR head d48bd5db4(11-25 我推的合并)对 base 为 dirty;live master 已推进到 c4eab2ea20b(领先 306 提交)。
  2. merge origin/master 进分支(merge 而非 rebase——免 force-push,保留 PR 提交史)。10 个文件双方都改,8 个 git 自动合并干净(含上次语义冲突的 dsh-compaction-disable.ts——本次自动合并结果已核验:entryNameOf(fiber) 读法 + selective === 0 分支 + master 新增的 hostPlaneRowsMissingAutoFalse 全部在位且函数体连贯),两个冲突均为纯并集:
    • tsup.config.ts:PR 的 src/agent/dsh-native-compaction.ts 构建入口 + master 的 src/agent/envelope-client.ts 入口,各在其原位置保留;
    • reference/architecture.md:PR 的 dsh-native-compaction.ts 地图行 + master 的 envelope-client.ts 地图行,按字母序并排保留。
  3. 本地验证(§7.2:全量回归交 CI):npm run typecheck ✅、npm run build ✅(build-info commit=1aae2930cab);定向套件 128/128 全过(dsh-native-compaction + issue7190-dsh-runtime-preset-coverage + dsh-llm-stream-attribution + native-intercept);文档守卫全绿(gen-config-docs check-coverage 210 env + 63 key、check-architecture-docs all green);package.json 双导出(./dsh-native-compaction + ./envelope-client)、check-unused-exports 双条目、server.yaml 配置种子(含 ja)逐一核验在位。
  4. 推送 merge commit 1aae2930cab(正确 2 父:d48bd5db4 + c4eab2ea20b)到 fork 分支 bluesmilery:2026-11-10_dsh-model-native-compaction——普通 fast-forward 推送(推送前核验 fork 分支 head 仍是 d48bd5db4,无并发推送、无需 force)。无 [ework:ci-held] 标记——本地验证过后的最终 head,即本分支唯一一次全量 CI 跑。
  5. 推送后核实:PR mergeable: true、mergeable_state: blocked——不再是 dirty(blocked 仅因仍是 draft 且为 feat 类 human-only 档)。CI 在新 head 1aae2930cab 上跑,结果以 CI 为准。

运维备注:本共享工作区的 fork remote 残留指向了别的任务的仓库,导致本轮开头一度误判「fork 分支被删」;已把 remote 纠正为 PR 实际 fork(bluesmilery)后确认分支一直健在(head d48bd5db4),本轮无任何 force-push。

结构化八问

  1. 是什么问题:PR 分支与 master 再次合并冲突(merge state: dirty),无法合并。
  2. 什么原因导致的:分支上次同步停在 85afa7b21,其后 master 前进 306 提交;双方都在 tsup.config.ts 入口数组与 reference/architecture.md 文件地图的同一位置各自追加了新条目(PR 加 dsh-native-compaction.ts,master 加 envelope-client.ts),文本冲突。
  3. 影响范围与严重程度:仅阻塞 PR 合并,无运行时影响。
  4. 怎么修复的:merge master 进分支;两处冲突按纯并集解(两侧条目各在其原位置保留,互不覆盖);其余重叠文件自动合并后逐一核验两侧改动在位。
  5. 是否有回归问题:无。本地 typecheck/build 绿;定向套件 128/128 全过;文档守卫全绿;master 侧 306 提交改动完整保留,无残留冲突标记。
  6. 是否破坏缓存:不涉及(纯合并冲突解决,无运行时/缓存语义改动)。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及(dsh.nativeCompactionModels 是 PR 原有内容,仍待 owner 批准,本次未动)。

判定:冲突已解、本地验证全绿、已推送 1aae2930cab(无 ci-held 标记,本分支唯一一次全量 CI),PR 不再是 dirty(blocked 仅因 draft)。CI 在新 head 上跑,绿后由 owner 决定 un-draft / 合并。本 bot 不撤 draft、不合并、不关闭(owner 权限)。

@ranxianglei

Copy link
Copy Markdown
Owner

(ai: vllm-qwen/qwen3.8-27b)

Merge-delta review at head 1aae293 (d48bd5d + master c4eab2e, 306 commits)

The PR's own diff is semantically unchanged from the previously reviewed head (28 files, +967/-29; content lines byte-identical — the only textual delta is the tsup.config.ts entry line, where master's envelope-client.ts now sits in the base and the PR still adds exactly dsh-native-compaction.ts). This review covers the master sync only.

14 both-side files — all verified clean unions.

CI: 30/30 checks green on 1aae293.

Verdict: no new findings. The PR remains a DRAFT feature PR adding the owner-gated dsh.nativeCompactionModels config field; the contract decision (recommended: approve the shape as-is — see the review thread on mirror issue #6126) is still pending with the owner, and the pre-undraft punch list (title-request scoping + test, 4 test rows, 2 doc sentences) is unchanged.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)

Re-review at new head 1aae293 (second master sync) — no new findings; verdict unchanged: 🔶 需要决策

The CI engineer's sync (floor 116) produced head 1aae293 (2 parents: d48bd5d + master c4eab2e, 306 commits). I independently verified the merge delta:

  1. PR's own diff semantically unchanged: 28 files, +967/-29 — content lines byte-identical to the previously reviewed head; the only textual delta is the tsup.config.ts entry line (master's envelope-client.ts is now in the base; the PR still adds exactly dsh-native-compaction.ts). All 14 PR-only files byte-identical to the PR parent.
  2. 14 both-side files — all clean unions. The two same-line conflicts (tsup.config.ts, reference/architecture.md) are exact unions (verified: entry list = BASE + both additions, nothing lost). In dsh-compaction-disable.ts master's only change is the try/catch around ctx.agentPresets in presetRegistryOf (a different function from every PR hunk). In dsh-native.ts master's [Bug][dsh] When dsh quits or restarts (incl. self-update), the plugin loses session identity and every model request silently goes direct uncompressed — the user gets no notice #8051 host-dying refusal and the coreAlignEnvelopeIds signature change (新提案:egress 流水表成为会话内容唯一权威(存储解耦 + 服务端快照权威) #7439 follow-up; the shared definition in pi-msgids.ts is master-only, so the call site is consistent) sit in separate functions from the PR's feature hunks. In native-intercept.ts master's refuse-host-dying verdict and the PR's nativeCompactionBypass are in different regions. config.ts: master touched compat/network/sessions, the PR touched the dsh section — no overlap. Scripts, tests, package.json (version 0.1.218 + both exports), docs: additive on both sides, verified line-for-line.
  3. CI: 30/30 checks green on 1aae293.

One note on floor 116: hostPlaneRowsMissingAutoFalse was NOT new in this 306-commit window — it already existed at 85afa7b (the previous sync point); it is present in the merged file at line 404 either way.

Still pending (unchanged):

  • Owner decision on the dsh.nativeCompactionModels config contract (recommended Option A: approve the shape as-is) — the PR is a DRAFT feature PR adding an owner-gated config field, so no APPROVE is posted until the contract is signed off.
  • Pre-undraft punch list: title-request scoping decision + test, 4 missing test rows (client React probe, /bili/origin?sessionId= policy face, title-request behavior, ready-set miss with valid id), 2 doc sentences (blast radius, bad-config edge).

结构化八问

  1. 是什么问题: 本轮不是新缺陷——CI 工程师第二次把 master(306 个提交)合入 PR 分支产生新 head 1aae293;本轮审查验证该合并增量是否正确。
  2. 什么原因导致的: 不适用(无缺陷)。两处文本冲突(tsup.config.ts 入口数组、reference/architecture.md 文件地图)都是双方在同行各自追加新条目(PR 加 dsh-native-compaction.ts,master 加 envelope-client.ts)。
  3. 影响范围与严重程度: 仅 dsh 车道 compaction 门控路径与构建入口。已验证:两处冲突为精确并集(无丢失无多余);master 侧 [Bug][dsh] When dsh quits or restarts (incl. self-update), the plugin loses session identity and every model request silently goes direct uncompressed — the user gets no notice #8051 host-dying、envelope 对齐签名变更等与 PR hunk 分处不同函数,无语义交互;PR 自身 diff 与此前已审 head 语义一致。
  4. 怎么修复的: 本轮是验证而非修复:对两个父提交做逐行 diff + 14 个双方触碰文件的行多重集比对 + 冲突文件逐处人工核对 + 14 个 PR 独有文件字节比对 + CI 全量(30/30 绿)。
  5. 是否有回归问题: 无。既有行为逐项:master 侧 306 提交改动完整保留([Bug][dsh] When dsh quits or restarts (incl. self-update), the plugin loses session identity and every model request silently goes direct uncompressed — the user gets no notice #8051、The session gradually crashes while reading images. | 读图的时候会话逐渐炸掉 #7693 image-shed 移除、SQLite corruption: every completed checkpoint silently truncates index.db-wal from under live peers (journal_size_limit engine path bypasses the #7156 guard) — default 8 MiB cap should be off #7674 WAL 文档、degenerateTurn 等均在位);PR 特性路径代码与此前已审版本一致;默认路径(selective 关)行为不变。
  6. 是否破坏缓存: 不涉及——未触碰缓存/重试/游标/去重逻辑。
  7. 是否改了设计方向: 无。
  8. 是否引入了新的配置: 本轮无。PR 的 dsh.nativeCompactionModels 字段形态未变,契约仍在等 owner 拍板(推荐 Option A:按现形态批准)。

收工判定: 第二次合并增量验证通过,无新发现;PR 保持 draft,结论维持 🔶 需要决策——等 owner 对 config 契约拍板后,作者补齐 pre-undraft 清单再 undraft。

协调一行: PR #6123 状态 = 绿(30/30 CI, head 1aae293, mergeable, 仅 draft 阻塞),第二次合并增量审查通过,无新发现,等待 owner 决策。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)

This is a self-forward of my own PR comment (#6123 (comment)) — the merge-delta review at head 1aae293, already summarized in my reply above (3450 chars, 八问 included). No new input since then: state unchanged, verdict stays 🔶 需要决策 — awaiting owner sign-off on the dsh.nativeCompactionModels config contract, PR remains draft.

@bluesmilery

Copy link
Copy Markdown
Author

Updated this branch in fb4e82c for the runtime preset registry introduced since the original proposal. The registration hook previously disabled the stock compactor even after the selective load-time rewrite. Both paths now preserve the stock backend in its own group and remain idempotent; presets without an enabled backend keep their stock no-backend behavior. Declared auxiliary calls no longer need a live main-session generation. The guide documents refusal scope and invalid configuration.

Validated the release port on v0.1.218: 174 focused route/transport tests and 16 side-by-side cases using the actual DSH 0.2.2-rc.5 runtime (including GPT/Claude paths, switches, repeated pressure, oversized input and provider failures). No change to native summary prompts, budgets or algorithms. The prerequisite config remains opt-in; leaving the PR as a draft for the owner's configuration-surface decision.

The dependent fold-reuse change has its own PR: #8123. It is not included in this branch.

@ranxianglei

Copy link
Copy Markdown
Owner

(ai: vllm-qwen/qwen3.8-27b)

Review of new commit fb4e82c (on top of the verified 1aae293 merge)

This commit fixes a real bug and addresses part of the review punch list. Verified line-by-line:

1. Runtime registration bug fix — confirmed real and correct. disableRuntimePresetCompaction previously called disableBasicCompaction unconditionally — in selective mode the runtime path stripped the stock compactor even though the load-time path preserved it. It now branches on selectiveCompactionEnabled(), and the rows === 0 case routes through selectiveBasicCompaction (adding the noBackend adapter) instead of returning the definition unchanged — consistent with the load-time path. Both factory presets and runtime registrations now use the same policy, as the updated doc states.

2. selectiveBasicCompaction rewrite — correct. The new visit is group-aware (adapter lands in the group that holds the backend), disabled-aware (a disabled: true basic row — the overlay's own mechanism — no longer counts as an enabled backend, so such presets get the noBackend adapter), and falls back to a top-level noBackend adapter when no backend/adapter is attached anywhere. Idempotency is pinned by the new test's second-pass assertion across all five shapes. One pre-existing edge is unchanged (not a regression): a top-level adapter row beside a group containing the backend yields the adapter in both places — identical to the old code's behavior, reachable only via hand-written custom presets.

3. titleRequest → auxiliary generalization — sound, zero default-path impact. Any declared purpose other than conversation/compaction is now treated as auxiliary (raw session id, ready-check exempt, recall-seed skipped in beforeSend). Verified gating: generationIsolation is only true when the config key is present (even []), so with the key absent (the default) compactionConversationId returns the raw id anyway and no rules exist — the generalization is a no-op for unconfigured users. For configured users it generalizes the previously session-title-only treatment to all declared auxiliary purposes (dsh sets purpose on every auxiliary call; conversation leaves it unset), which is the forward-compatible direction. The new attribution test pins x-bili-plugin-conversation = raw sid for session-title and session-tag.

4. Doc claims verified against code. "A malformed rule in an otherwise readable config prevents the DSH plugin from activating" — true: configureNativeCompaction (src/agent/dsh-native-compaction.ts:26) throws inside declareDshCompactionActive → apply() → lane activation fails. "A file that cannot be parsed follows the normal config-loader fallback; it cannot enable these rules" — true: loadConfigFile (src/config.ts:2759) catches parse errors and falls back to defaults. Both en/zh.

5. Release-port script — six model patterns (GPT/Claude paths), three new scenarios (claude-pressure, switch-bili-to-claude, switch-gpt-to-claude), and realDSH now read from the runtime's package.json instead of a hardcoded string. No change to native summary prompts, budgets or algorithms (verified: the diff touches none of those surfaces). No kernel/ changes.

Punch-list status after this commit (from the original review, mirror issue #6126 floor 5):

  • Malformed-config doc sentence: done (en+zh, claims verified true).
  • Title-request behavior: decided + pinned — auxiliary calls stay on the raw session id, generalized to all declared purposes, test added. The "accepted storage noise" doc sentence is still missing (auxiliary payloads accumulate under the raw-id conversation at generation ≥ 1 — small, now pinned by test, undocumented).
  • Fail-closed blast radius in the PR body ("Behavior" section): still missing — the replaceGeneration-missing ⇒ all conversation-id calls throw ⇒ even bili-owned models lose their tools sentence is in the doc but not in the PR body.
  • Test rows: 1 of 4 — title-request behavior added; still missing: client React probe path, /bili/origin?sessionId= policy face, ready-set miss with a valid id.
  • Nit: noteGateCoverage still not called on the new noBackend branch (telemetry only).

CI: running on fb4e82c (0 failed so far, 9 checks still pending at review time).

Verdict: no new findings; the commit is a net improvement. The PR remains a DRAFT feature PR adding the owner-gated dsh.nativeCompactionModels config field — the contract decision (recommended: approve the shape as-is) is still pending with the owner.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)

Re-review at new head fb4e82c (author's new commit on top of the verified 1aae293 merge) — no new findings; the commit fixes a real bug and closes part of the punch list. Verdict unchanged: 🔶 需要决策

The author pushed fb4e82c ("Keep selective compaction intact for runtime presets and scoped auxiliary calls"). I verified it line-by-line:

  1. Runtime registration bug fix — real and correct. The runtime preset hook previously called disableBasicCompaction unconditionally — in selective mode it stripped the stock compactor even though the load-time path preserved it. It now branches on selectiveCompactionEnabled(), and the rows === 0 case adds the noBackend adapter via selectiveBasicCompaction (consistent with load-time). Factory and runtime registrations now share one policy.
  2. selectiveBasicCompaction rewrite — correct. Group-aware (adapter lands in the group holding the backend), disabled-aware (a disabled: true basic row no longer counts as an enabled backend), noBackend fallback when nothing is attached, idempotent (second-pass assertion in the new test across all five shapes). One pre-existing edge unchanged (top-level adapter beside a group with the backend → adapter in both places — same as old code, custom-preset-only, not a regression).
  3. titleRequest → auxiliary generalization — sound, zero default-path impact. Any declared purpose other than conversation/compaction is now auxiliary (raw session id, ready-check exempt, recall-seed skipped). Verified: generationIsolation is only true when the config key is present (even []), so unconfigured users see no change. The new attribution test pins x-bili-plugin-conversation = raw sid for session-title and session-tag.
  4. Doc claims verified true against code (malformed rule → configureNativeCompaction throws in declareDshCompactionActive → lane activation fails; unparseable file → loadConfigFile fallback to defaults).
  5. No change to native summary prompts/budgets/algorithms (verified in the diff); no kernel/ changes. CI running on fb4e82c (0 failed, 9 checks pending at review time).

Punch-list status (origin: floor 5):

  • ✅ Malformed-config doc sentence (en+zh) — done, claims verified.
  • ✅ Title-request behavior — decided (auxiliary calls stay on the raw session id, generalized to all declared purposes) + test pinned. The "accepted storage noise" doc sentence is still missing.
  • ❌ Fail-closed blast radius in the PR body "Behavior" section — still missing (the replaceGeneration-missing ⇒ all conversation-id calls throw ⇒ even bili-owned models lose their tools sentence is in the doc but not the PR body).
  • ⏳ Test rows: 1 of 4 — title-request added; still missing: client React probe path, /bili/origin?sessionId= policy face, ready-set miss with a valid id.
  • ⏳ Nit: noteGateCoverage still not called on the noBackend branch (telemetry only).

结构化八问

  1. 是什么问题: 作者针对 master 新增的运行时预设注册表推了新提交 fb4e82c——运行时注册钩子在 selective 模式下误用 disableBasicCompaction(把原厂压缩器也禁了),且 title 请求的豁免面过窄;本轮审查验证该修复与泛化是否正确。
  2. 什么原因导致的: 运行时注册路径(disableRuntimePresetCompaction)写于 selective 模式引入之前,未随加载时路径一起分轨;titleRequest 只豁免 session-title 一个 purpose,而 dsh 对所有辅助调用都盖 purpose。
  3. 影响范围与严重程度: 仅 dsh 车道 selective 模式(配置了 dsh.nativeCompactionModels 的 opt-in 面)。已验证默认路径(缺键)零影响(generationIsolation 仅在键存在时为 true);修复前运行时预设会丢失原厂压缩后端(功能失效),修复后保留。
  4. 怎么修复的: ① 运行时路径按 selectiveCompactionEnabled() 分轨,rows=0 走 noBackend 适配器;② selectiveBasicCompaction 重写为组感知 + disabled 感知 + 无后端回退,幂等(测试钉二次通过);③ 豁免面泛化为「一切声明的辅助 purpose」,配测试钉住 raw-sid 行为;④ 文档补拒绝作用域与坏配置两句(en+zh,已对代码逐句验证为真)。
  5. 是否有回归问题: 无。默认路径字节级不变(缺键⇒无规则⇒无隔离);selective 路径的既有行为(加载时分支、noBackend 语义、WS 所有权、generation 命名空间)逐项核对未被破坏;一处既有边缘行为(顶层适配器 + 组内后端⇒两处都挂适配器)与新代码前一致,非回归。
  6. 是否破坏缓存: 不涉及——辅助调用跳过 recall 种子是修正(辅助轮本不该给 scoped 会话种增量游标),主流量路径不变。
  7. 是否改了设计方向: 无。
  8. 是否引入了新的配置: 无新增。dsh.nativeCompactionModels 形态未变,契约仍待 owner 拍板(推荐 Option A:按现形态批准)。

收工判定: 新提交验证通过、无新发现,小修清单推进了 2 项(坏配置文档句、title 行为决策+测试);剩余:PR 正文 blast-radius 句、3 条测试行、辅助存储噪声文档句、noteGateCoverage 小疵。PR 保持 draft,结论维持 🔶 需要决策——等 owner 对 config 契约拍板后补齐剩余清单再 undraft。

协调一行: PR #6123 状态 = 作者新提交 fb4e82c 已审(修复真实 bug + 泛化辅助豁免,无新发现),CI 运行中(0 失败),等待 owner 决策。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)

Self-forward of my own PR comment (#6123 (comment)) — the fb4e82c review, already summarized in my reply above (4281 chars, 八问 included). No new input since then: state unchanged, verdict stays 🔶 需要决策 — awaiting owner sign-off on the dsh.nativeCompactionModels config contract; remaining punch-list items (PR-body blast-radius sentence, 3 test rows, auxiliary storage-noise doc sentence, noteGateCoverage nit) are listed there.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

PR #6123 冲突再次处理完成(本轮是「双方都在动」的新一轮:作者在我上次的合并之上推了新提交,master 又前进了 28 提交)。

本次做了什么

  1. 核实 live 状态:作者 bluesmilery 在我 12-02 04:43 推的合并 1aae2930cab 之上新推了提交 fb4e82c6385(「Keep selective compaction intact for runtime presets and scoped auxiliary calls」,只动 7 个 PR 侧文件:dsh-native-compaction 文档/脚本/测试 + dsh-compaction-disable.ts + dsh-native.ts);同时 master 自 c4eab2ea20b 前进 28 提交到 96e46fdcb58(含 KDD release v0.1.10 #26:dist 入口 chunk 化 / 惰性 inline-engine + 共享 chunks,[PR] fix: dedupe dist bundles — shared code once, engine lazy (62MB → 7.8MB, #8074) #8131——重写了 tsup.config.ts 入口数组)。PR head 不含新 master → dirty。
  2. merge origin/master 进分支(merge 而非 rebase——免 force-push,保留 PR 提交史)。仅 1 个冲突,纯并集:tsup.config.ts 入口数组——PR 的 src/agent/dsh-native-compaction.ts 条目(留在 dsh-compaction-gate.ts 之后的原位置)+ master 的 src/inline-engine.ts 条目(留在数组末尾的原位置),两侧各归其位。其余 4 个双方都改的文件(docs/configuration.{md,zh-CN,ja}.md、reference/architecture.md)git 自动合并干净,已逐一核验:PR 的 dsh-native-compaction.ts 地图行与 master 的 KDD release v0.1.10 #26 行(inline-engine-ref.ts / inline-engine.ts)全部在位。
  3. 本地验证(§7.2:全量回归交 CI):npm run typecheck ✅、npm run build ✅(build-info commit=8ecd6626165,KDD release v0.1.10 #26 的 splitting/chunks 新构建链在新 head 上正常);定向套件 130/130 全过(dsh-native-compaction + issue7190-dsh-runtime-preset-coverage + dsh-llm-stream-attribution + native-intercept——比上次 128 多 2 个,来自作者新提交新增的测试);文档守卫全绿(gen-config-docs check-coverage 211 env + 63 key、check-architecture-docs all green)。
  4. 推送 merge commit 8ecd6626165(正确 2 父:fb4e82c6385 + 96e46fdcb58)到 fork 分支 bluesmilery:2026-11-10_dsh-model-native-compaction——普通 fast-forward 推送(推送前核验 fork 分支 head 仍是 fb4e82c6385,作者无并发新推、无需 force)。无 [ework:ci-held] 标记——本地验证过后的最终 head,即本分支唯一一次全量 CI 跑。
  5. 推送后核实:PR mergeable: true、mergeable_state: blocked——不再是 dirty(blocked 仅因仍是 draft 且为 feat 类 human-only 档)。CI 在新 head 8ecd6626165 上跑,结果以 CI 为准。

结构化八问

  1. 是什么问题:PR 分支与 master 再次合并冲突(merge state: dirty),无法合并。
  2. 什么原因导致的:上次同步后双方都在动——作者在分支上推了 selective-compaction 行为修正提交,master 侧 KDD release v0.1.10 #26([PR] fix: dedupe dist bundles — shared code once, engine lazy (62MB → 7.8MB, #8074) #8131)重写了 tsup.config.ts 入口数组(新增 inline-engine.ts 独立入口 + splitting/chunks),与 PR 的 dsh-native-compaction.ts 条目落在同一行,文本冲突。
  3. 影响范围与严重程度:仅阻塞 PR 合并,无运行时影响。
  4. 怎么修复的:merge master 进分支;唯一冲突按纯并集解(两个新条目各归其位,互不覆盖);自动合并文件逐一核验两侧改动在位。
  5. 是否有回归问题:无。本地 typecheck/build 绿(含 KDD release v0.1.10 #26 新构建链);定向套件 130/130 全过(含作者新提交新增的 2 个测试);文档守卫全绿;master 侧 28 提交改动完整保留,无残留冲突标记。
  6. 是否破坏缓存:不涉及(纯合并冲突解决,无运行时/缓存语义改动)。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及(dsh.nativeCompactionModels 是 PR 原有内容,仍待 owner 批准,本次未动)。

判定:冲突已解、本地验证全绿、已推送 8ecd6626165(无 ci-held 标记,本分支唯一一次全量 CI),PR 不再是 dirty(blocked 仅因 draft)。CI 在新 head 上跑,绿后由 owner 决定 un-draft / 合并。本 bot 不撤 draft、不合并、不关闭(owner 权限)。

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants